package com.ssy.lingxi.product.handler.init;

import com.ssy.lingxi.product.service.customer.ICustomerCategoryService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 服务启动时会员品类缓存到redis
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/7/29
 */
@Data
@Component
public class CustomerCategoryHandler implements ApplicationRunner {

    @Autowired
    private ICustomerCategoryService customerCategoryService;

    @Override
    public void run(ApplicationArguments args) {
        customerCategoryService.initToRedis();
    }
}
